<% layout("/common/layout.html",{"title":"工商申请审批"}){ %>
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-8">
        <h2>工商变更列表</h2>
        <ol class="breadcrumb">
            <li><a href="${ctxPath}/admin/main">主页</a></li>
            <li><a href="../view/index">工商变更列表</a></li>
            <li class="active">审批</li>
        </ol>
    </div>
    <div class="col-sm-4">
        <div class="title-action">
            <a class="btn btn-primary btn-outline" href="../view/index"><i class="fa fa-reply"> </i> 返回列表</a>
        </div>
    </div>
</div>

<div class="wrapper wrapper-content">
    <div class="tabs-container" id="tabs-container">
        <ul class="nav nav-tabs">
            <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true"> 基本信息</a></li>
            <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">股东信息</a></li>
            <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">成员信息</a></li>
            <li class=""><a data-toggle="tab" href="#tab-4" aria-expanded="false">审批日志</a></li>
            <li class=""><a data-toggle="tab" href="#tab-5" aria-expanded="false">审批建议</a></li>
        </ul>
        <div class="tab-content">
            <div id="tab-1" class="tab-pane active">
                <div class="panel-body">
                    <div class="form-horizontal">
                        <div class="form-group">
                            <label class="control-label-info pull-left">原企业名称：</label>
                            <div class="col-sm-10">
                                <div class="input-group col-sm-4">
                                    <input class="form-control" type="text" value="${companyApply.companyName}" disabled>
                                </div>
                            </div>
                        </div>

                        <%
                        if(companyApply.companyName != companyChange.companyName){
                        %>
                        <div class="form-group">
                            <label for="companyName" class="control-label-info pull-left">新企业名称：</label>
                            <div class="col-sm-10">
                                <div class="input-group col-sm-4 companyBrandList">
                                    <input id="companyName" name="companyName" class="form-control" type="text" value="${companyChange.companyName}" disabled>
                                    <span class="input-group-addon">
                                        <label class="radio-input-inline"><input type="checkbox" name="auditSelected" data-message="首选字号：《${companyChange.companyBrand}》可用；">可用</label>
                                  </span>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="companyName" class="control-label-info pull-left text-danger">新备选字号：</label>
                            <div class="col-sm-10" id="companyBrandList">
                                <%
                                if(isNotEmpty(companyBrandOptionalList)){
                                for(brand in companyBrandOptionalList){
                                %>
                                <div class="input-group col-sm-4 companyBrandList">
                                    <input class="form-control" type="text" value="${companyChange.region}${brand}${companyChange.industry}${companyChange.companyType}" disabled>
                                    <span class="input-group-addon">
                                        <label class="radio-input-inline"><input type="checkbox" name="auditSelected" data-message="备选字号：《${brand}》可用；">可用</label>
                                  </span>
                                </div>
                                <% }
                                }
                                %>
                                <label class="radio-input-inline text text-danger">
                                    <input type="checkbox" id="allBrandDisabled" name="auditSelected" data-message="所有字号：均不可用；"><b>所有字号都不可用</b>
                                </label>
                            </div>
                        </div>
                        <%
                        }
                        %>


                        <div class="form-group">
                            <label class="control-label-info pull-left">原注册资本：</label>
                            <div class="col-sm-3">
                                <input class="form-control" type="text" value="${companyApply.registeredCapital}万元" disabled>
                            </div>
                        </div>

                        <%
                        if(companyApply.registeredCapital != companyChange.registeredCapital){
                        %>
                        <div class="form-group">
                            <label for="registeredCapital" class="control-label-info pull-left text-danger">新注册资本：</label>
                            <div class="col-sm-10">
                                <div class="input-group col-sm-4">
                                    <input id="registeredCapital" name="registeredCapital" class="form-control" type="text" value="${companyChange.registeredCapital}万元" disabled>
                                    <span class="input-group-addon">
                                        <label class="radio-input-inline"><input type="checkbox" name="auditSelected" data-message="注册资本：填写有误；">填写有误</label>
                                  </span>
                                </div>
                            </div>
                        </div>
                        <%
                        }
                        %>


                        <div class="form-group">
                            <label class="control-label-info pull-left">原企业行业：</label>
                            <div class="col-sm-3">
                                <input class="form-control" type="text" value="${companyApply.industry}" disabled>
                            </div>
                        </div>
                        <%
                        if(companyApply.industry != companyChange.industry){
                        %>
                        <div class="form-group">
                            <label for="industry" class="control-label-info pull-left text-danger">新企业行业：</label>
                            <div class="col-sm-10">
                                <div class="input-group col-sm-4">
                                    <input id="industry" name="industry" class="form-control" type="text" value="${companyChange.industry}" disabled>
                                    <span class="input-group-addon">
                                        <label class="radio-input-inline"><input type="checkbox" name="auditSelected" data-message="企业行业：填写有误；">填写有误</label>
                                  </span>
                                </div>
                            </div>
                        </div>
                        <%
                        }
                        %>



                        <div class="form-group">
                            <label class="control-label-info pull-left">原企业类型：</label>
                            <div class="col-sm-3">
                                <input class="form-control" type="text" value="${companyApply.companyType}" disabled>
                            </div>
                        </div>

                        <%
                        if(companyApply.companyType != companyChange.companyType){
                        %>
                        <div class="form-group">
                            <label for="companyType" class="control-label-info pull-left text-danger">新企业类型：</label>
                            <div class="col-sm-10">
                                <div class="input-group col-sm-4">
                                    <input id="companyType" name="companyType" class="form-control" type="text" value="${companyChange.companyType}" disabled>
                                    <span class="input-group-addon">
                                        <label class="radio-input-inline"><input type="checkbox" name="auditSelected" data-message="企业类型：填写有误；">填写有误</label>
                                  </span>
                                </div>
                            </div>
                        </div>
                        <%
                        }
                        %>
                        <div class="form-group">
                            <label class="control-label-info pull-left">原注册地址：</label>
                            <div class="col-sm-6">
                                <input class="form-control" type="text" value="${companyApply.companyAddress}" disabled>
                            </div>
                        </div>
                        <%
                        if(companyApply.companyAddress != companyChange.companyAddress){
                        %>
                        <div class="form-group">
                            <label for="companyAddress" class="control-label-info pull-left text-danger">新注册地址：</label>
                            <div class="col-sm-10">
                                <div class="input-group col-sm-7">
                                    <input id="companyAddress" name="companyAddress" class="form-control" type="text" value="${companyChange.companyAddress}" disabled>
                                    <span class="input-group-addon">
                                        <label class="radio-input-inline"><input type="checkbox" name="auditSelected" data-message="注册地址：填写有误；">填写有误</label>
                                  </span>
                                </div>
                            </div>
                        </div>
                        <%
                        }
                        %>
                        <div class="form-group">
                            <label class="control-label-info pull-left">原经营范围：</label>
                            <div class="col-sm-6">
                                <textarea class="form-control" rows="5" disabled>${companyApply.businessScope}</textarea>
                            </div>
                        </div>
                        <%
                        if(companyApply.businessScope != companyChange.businessScope){
                        %>
                        <div class="form-group">
                            <label for="businessScope" class="control-label-info pull-left text-danger">新经营范围：</label>
                            <div class="col-sm-6">
                                <textarea id="businessScope" class="form-control" rows="5" disabled>${companyChange.businessScope}</textarea>
                                <div class="m-t-sm pull-right">
                                    <label class="radio-input-inline text text-danger m-t-xs">
                                        <input type="checkbox" data-message="经营范围：已被审核员重新编辑；" name="auditSelected" class="m-t-n" id="changeBusinessScope"><b>勾选后编辑经营范围</b>
                                    </label>
                                    &emsp; &emsp;
                                    <button class="btn btn-primary" id="doSubmitBusinessScope" type="button">提交修改</button>
                                </div>
                            </div>
                        </div>
                        <%
                        }
                        %>

                        <% if(isNotEmpty(changeImagesList)){ %>
                        <div class="form-group">
                            <label for="businessScope" class="control-label-info pull-left text-danger">新协议证照：</label>
                            <div class="row col-sm-10" id="businessScopeImage">
                                <% if(isNotEmpty(changeImagesList)){
                                for(image in changeImagesList){ %>
                                <div class="col-sm-2">
                                    <img src="${uploaderFilesDomain!}${image.img!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                                <% }}else{ %>
                                <div class="col-sm-2">
                                    <img src="${uploaderFilesDomain!}${uploaderImageNotpic!}" class="img-thumbnail" title="暂无图片" alt="暂无图片">
                                </div>
                                <% } %>
                                <div class="col-sm-12">
                                    <label class="radio-input-inline  text text-danger">
                                        <input type="checkbox" name="auditSelected" data-message="协议证照：不清晰；"><b>协议证照不清晰</b>
                                    </label>
                                    &emsp;&emsp;
                                    <label class="radio-input-inline  text text-danger">
                                        <input type="checkbox" name="auditSelected" data-message="协议证照：缺少资料；"><b>协议证照缺少资料</b>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <% } %>


                    </div>
                </div>
            </div>
            <div id="tab-2" class="tab-pane">
                <div class="panel-body">
                    <h3 class="text text-center">原股东信息</h3>
                    <table class="table table-hover table-bordered bg-warning">
                        <thead>
                        <tr>
                            <th width="8%">姓名</th>
                            <th width="20%">身份</th>
                            <th width="12%">联系方式</th>
                            <th width="10%">出资</th>
                            <th width="12%">证件</th>
                            <th width="16%">证件照</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                        if(isNotEmpty(applyShareholderList)){
                        for(shareholder in applyShareholderList){
                        %>
                        <tr>
                            <td>${shareholder.name}</td>
                            <td>${webUtil.memberIdentity(shareholder.identitys)}</td>
                            <td><i class="fa fa-phone-square"></i>&nbsp;${shareholder.phone}<br><i class="fa fa-envelope"></i>&nbsp;${shareholder.email}</td>
                            <td>时间：${shareholder.investmentTime}年 <br> 金额：${shareholder.investmentAmount}万元 <br> 类型：${webUtil.memberInvestmentMode(shareholder.investmentMode)}</td>
                            <td>类型：${decode(shareholder.cardType,1,'身份证',2,'营业执照',3,'其他有效证件')}<br>编号：${shareholder.cardNumber}</td>
                            <td class="IDcard">
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${shareholder.cardFrontPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${shareholder.cardBackPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                            </td>
                        </tr>
                        <% } }else{ %>
                        <tr>
                            <td colspan="7" class="text-center text-muted">暂无数据</td>
                        </tr>
                        <% } %>
                        </tbody>
                    </table>
                    <hr>
                    <h3 class="text text-center text-danger">新股东信息</h3>
                    <table class="table table-hover table-bordered bg-success">
                        <thead>
                        <tr>
                            <th width="8%">姓名</th>
                            <th width="20%">身份</th>
                            <th width="12%">联系方式</th>
                            <th width="10%">出资</th>
                            <th width="12%">证件</th>
                            <th width="16%">证件照</th>
                            <th width="10%">标记</th>
                        </tr>
                        </thead>
                        <tbody id="changeSharehoderList">
                        <%
                        var applyTotalAmount = 0;
                        if(isNotEmpty(applyShareholderList)){
                        for(shareholder in applyShareholderList){
                        applyTotalAmount = applyTotalAmount + parseDouble(shareholder.investmentAmount);
                        %>
                        <tr>
                            <td>${shareholder.name}</td>
                            <td>${webUtil.memberIdentity(shareholder.identitys)}</td>
                            <td><i class="fa fa-phone-square"></i>&nbsp;${shareholder.phone}<br><i class="fa fa-envelope"></i>&nbsp;${shareholder.email}</td>
                            <td>时间：${shareholder.investmentTime}年 <br> 金额：${shareholder.investmentAmount}万元 <br> 类型：${webUtil.memberInvestmentMode(shareholder.investmentMode)}</td>
                            <td>类型：${decode(shareholder.cardType,1,'身份证',2,'营业执照',3,'其他有效证件')}<br>编号：${shareholder.cardNumber}</td>
                            <td class="IDcard">
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${shareholder.cardFrontPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${shareholder.cardBackPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                            </td>
                            <td>
                                <label class="radio-input-inline holderPicture">
                                    <input type="checkbox" name="auditSelected" data-message="股东信息：《${shareholder.name}》证件照不清晰；">证件照不清晰
                                </label>
                                <br>
                                <label class="radio-input-inline holderInfo">
                                    <input type="checkbox" name="auditSelected" data-message="股东信息：《${shareholder.name}》资料有误；">资料有误
                                </label>
                            </td>
                        </tr>
                        <% } }else{ %>
                        <tr>
                            <td colspan="7" class="text-center text-muted">暂无数据</td>
                        </tr>
                        <% } %>
                        </tbody>
                        <%
                        if(isNotEmpty(applyShareholderList)){
                        %>
                        <thead>
                        <tr>
                            <th colspan="7" class="text text-danger">
                                <div class="pull-right">
                                    <label class="radio-input-inline"><input id="holderPictureDisabled" type="checkbox" name="auditSelected" data-message="股东信息：所有证件照不清晰；"><b>所有证件照均不清晰</b></label>
                                    &emsp;&emsp;
                                    <label class="radio-input-inline"><input id="holderInfoDisabled" type="checkbox" name="auditSelected" data-message="股东信息：所有资料均有误；"><b>所有资料均有误</b></label>
                                    &emsp;&emsp;
                                    <% if(parseDouble(companyApply.registeredCapital) != applyTotalAmount){ %>
                                    <label class="radio-input-inline text text-danger">
                                        <input type="checkbox" name="auditSelected" data-message="股东信息：注册资本有误；" checked="checked"><b>注册资本（${companyApply.registeredCapital}万元）与合计投资（${applyTotalAmount}万元）不相等；</b>
                                    </label>
                                    <% } %>
                                </div>
                            </th>
                        </tr>
                        </thead>
                        <%
                        }
                        %>
                    </table>
                </div>
            </div>

            <div id="tab-3" class="tab-pane">
                <div class="panel-body">
                    <h3 class="text text-center">原成员信息</h3>
                    <table class="table table-hover table-bordered bg-warning">
                        <thead>
                        <tr>
                            <th width="10%">身份</th>
                            <th width="18%">姓名</th>
                            <th width="18%">联系方式</th>
                            <th width="18%">证件</th>
                            <th width="18%">证件照</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                        if(isNotEmpty(applyMemberList)){
                        for(memeber in applyMemberList){
                        //法人和代办人
                        if(memeber.identity == 4 || memeber.identity == 7){
                        %>
                        <tr>
                            <td>${webUtil.memberIdentity(memeber.identity+'')}</td>
                            <td>${memeber.name}</td>
                            <td><i class="fa fa-phone-square"></i>&nbsp;${memeber.phone}<br><i class="fa fa-envelope"></i>&nbsp;${memeber.email}</td>
                            <td>类型：${decode(memeber.cardType,1,'身份证',2,'营业执照',3,'其他有效证件')}<br/>编号：${memeber.cardNumber}</td>
                            <td class="IDcard">
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${memeber.cardFrontPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${memeber.cardBackPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                            </td>
                        </tr>
                        <% } } }else{ %>
                        <tr>
                            <td colspan="6" class="text-center text-muted">暂无数据</td>
                        </tr>
                        <% } %>
                        </tbody>
                    </table>
                <hr>
                    <h3 class="text text-center text-danger">新成员信息</h3>
                    <table class="table table-hover table-bordered bg-success">
                        <thead>
                        <tr>
                            <th width="10%">身份</th>
                            <th width="18%">姓名</th>
                            <th width="18%">联系方式</th>
                            <th width="18%">证件</th>
                            <th width="18%">证件照</th>
                            <th width="10%">标记</th>
                        </tr>
                        </thead>
                        <tbody id="changeMemberList">
                        <%
                        if(isNotEmpty(applyMemberList)){
                        for(memeber in applyMemberList){
                        //法人和代办人
                        if(memeber.identity == 4 || memeber.identity == 7){
                        %>
                        <tr>
                            <td>${webUtil.memberIdentity(memeber.identity+'')}</td>
                            <td>${memeber.name}</td>
                            <td><i class="fa fa-phone-square"></i>&nbsp;${memeber.phone}<br><i class="fa fa-envelope"></i>&nbsp;${memeber.email}</td>
                            <td>类型：${decode(memeber.cardType,1,'身份证',2,'营业执照',3,'其他有效证件')}<br/>编号：${memeber.cardNumber}</td>
                            <td class="IDcard">
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${memeber.cardFrontPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${memeber.cardBackPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                            </td>
                            <td>
                                <label class="radio-input-inline memberPicture"><input type="checkbox" name="auditSelected" data-message="成员信息：《${memeber.name}》证件照不清晰；">照片不清晰</label>
                                <br>
                                <label class="radio-input-inline memberInfo"><input type="checkbox" name="auditSelected" data-message="成员信息：《${memeber.name}》资料错误；">资料有误</label>
                            </td>
                        </tr>
                        <% } } }else{ %>
                        <tr>
                            <td colspan="6" class="text-center text-muted">暂无数据</td>
                        </tr>
                        <% } %>
                        </tbody>
                        <%
                        if(isNotEmpty(applyShareholderList)){
                        %>
                        <thead>
                        <tr>
                            <th colspan="7" class="text text-danger">
                                <div class="pull-right">
                                    <label class="radio-input-inline"><input id="memberPictureDisabled" type="checkbox" name="auditSelected" data-message="成员信息：所有证件照不清晰；"><b>所有证件照均不清晰</b></label>
                                    &emsp;&emsp;
                                    <label class="radio-input-inline"><input id="memberInfoDisabled" type="checkbox" name="auditSelected" data-message="成员信息：所有资料均有误；"><b>所有资料均有误</b></label>
                                </div>
                            </th>
                        </tr>
                        </thead>
                        <%
                        }
                        %>
                    </table>
                </div>
            </div>

            <div id="tab-4" class="tab-pane">
                <div class="panel-body">
                    <table class="table table-hover table-bordered">
                        <thead>
                        <tr>
                            <th width="11%">审批人</th>
                            <th width="11%">审批时间</th>
                            <th width="8%">状态</th>
                            <th width="70%">建议</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                        if(isNotEmpty(flowProcessList)){
                        for(process in flowProcessList){
                        %>
                        <tr>
                            <td>${process.auditorNickName} / ${process.auditorUserName}</td>
                            <td class="text text-center">${process.updateTime,"yyyy-MM-dd HH:mm:ss"}</td>
                            <td>${webUtil.companyItemStatus(process.auditStatus!0)}</td>
                            <td>${process.message}</td>
                        </tr>
                        <%
                        }
                        }else{
                        %>
                        <tr>
                            <td colspan="4" class="text-center text-muted">暂无数据</td>
                        </tr>
                        <%
                        }
                        %>
                        </tbody>
                    </table>
                </div>
            </div>

            <div id="tab-5" class="tab-pane">
                <div class="panel-body">
                    <form class="form-horizontal" name="auditResultForm" method="post" role="form">
                        <input id="id" name="id" type="hidden" value="${companyApply.id}">
                        <div class="form-group">
                            <label for="businessScope" class="control-label-info pull-left">审批结果：</label>
                            <div class="col-sm-8">
                                <label class="radio-inline" for="auditStatus1"><input type="radio" value="1" name="auditStatus" id="auditStatus1" checked="checked" required="required">审批通过</label>
                                <label class="radio-inline" for="auditStatus2"><input type="radio" value="0" name="auditStatus" id="auditStatus2">退回修改</label>
                            </div>
                        </div>
                        <hr>
                        <div class="form-group">
                            <label for="businessScope" class="control-label-info pull-left">审批建议：</label>
                            <div class="col-sm-11">
                                <textarea name="auditMessage" class="form-control" id="auditMessage" rows="8" placeholder="请输入审批建议"></textarea>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="panel-footer">
                    <div class="col-sm-offset-3 clearfix">
                        <div class="mt5 mb5 block col-sm-3">
                            <a href="/companyChange/view/index" class="btn btn-warning btn-lg btn-block">返回列表</a>
                        </div>
                        <div class="mt5 mb5 block col-sm-3">
                            <button type="button" id="doSubmit" class="btn btn-primary btn-lg btn-block">提交审核</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

<% } %>
<script type="text/javascript">
    //页面JS调用
    require(['company/change'], function (change) {
        change.view();
    });
</script>
